<template>
	<view class="content">
		<view class="header">
			
		</view>
		<view class="name_wrap">
			<view class="name flex">
				<view class="text">{{detailsList.article_title}}</view>
			</view>
			<view class="details">
				<view v-html="detailsList.article_content"></view>
			</view>
		</view>
		<view class="bottom"></view>
	</view>
</template>

<script>
	import {
		gmdDetail
	} from '../../api/fan';
	export default {
		data() {
			return {
				info: {},
				detailsList: {},
				list1: []
			}
		},
		onLoad(op) {
			let id = op.id
			this.gmdDetails(id)
		},
		methods: {
			click(re) {
				if (this.detailsList.banner[re].url) {
					uni.navigateTo({
						url: `/pages/lieShen/lieShen?url=${this.detailsList.banner[re].url}`
					})
				}
			},
			gmdDetails(id) {
				gmdDetail(id).then(res => {
					console.log(res, '首页详情');
					if(res.data.data.banner){
						res.data.data.banner.forEach(item => {
							this.list1.push(item.img)
						})
					}
					
					this.detailsList = res.data.data
				})
			},
			hanleBack() {
				uni.navigateBack({
					delta: 1
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background-color: #f5fffe;
	}

	.header {
		width: 100%;
		height: 20rpx;
	}

	.name_wrap {
		width: 94%;
		margin: 0 auto;
		background-color: #fff;
		padding: 20rpx 0;
		border-radius: 30rpx;

		.details {
			padding: 28rpx 20rpx;
			// text-indent: 2rem;
			line-height: 1.8rem;
			font-size: 30rpx;
		}

		.address {
			justify-content: flex-start;
			align-items: center;
			margin-top: 10rpx;

			image {
				width: 30rpx;
				height: 30rpx;
				margin-left: 20rpx;
			}

			.add_text {
				font-size: 24rpx;
				color: #394f49;
				padding-left: 10rpx;
			}
		}

		.name {
			justify-content: space-between;
			align-items: center;

			.text {
				font-size: 36rpx;
				font-weight: 700;
				color: #394f49;
				padding-left: 20rpx;
				text-align: center;
			}

			.back {
				background-color: #457e82;
				color: #fff;
				font-size: 24rpx;
				padding: 4rpx 20rpx;
				border-radius: 20rpx;
				margin-right: 20rpx;
			}
		}
	}

	.bottom {
		width: 100%;
		height: 200rpx;
	}
</style>